<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%
	String path = request.getContextPath();
	/* String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/"; 
	因为微信使用的是80端口 再JSSDK中签名验证不要端口号
	
	*/
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":"
			+ path;
%>

<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
<title>阿里惠购</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=yes;" />
<script type="text/javascript" src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/js/jquery-1.6.2.min.js"></script>
<link href="<%=path %>>/tbgoods.css" rel="stylesheet" type="text/css" />

  <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  <!-- 微信自定义接口 -->
<script>
        var appid = "";
        var timestamp = "";
        var nonceStr = "";
        var signature = "";
        wx.config({
            debug: false,
            appId: appid,
            timestamp: timestamp,
            nonceStr: nonceStr,
            signature: signature,
            jsApiList: [
                "onMenuShareAppMessage",
                "onMenuShareTimeline",
                "chooseImage",
                "uploadImage",
                "downloadImage"
            ]
        });

	wx.ready(function(){
		wx.onMenuShareAppMessage({
			title: "阿里惠购 - 天猫淘宝内部优惠券",
			desc: "阿里旗下平台合作伙伴，内部优惠券发布！",
			link: window.location.href ,
			imgUrl: ""
		}); 
		wx.onMenuShareTimeline({
			title: "阿里惠购 - 天猫淘宝内部优惠券",
			desc: "阿里旗下平台合作伙伴，内部优惠券发布！",
			link: window.location.href ,
			imgUrl: ""
		});
	});
</script>
<!-- 微信自定义接口 -->    
</head>
<body>


    <div style="max-width:600px; margin:0 auto;position: relative;">
        <div class="yhq_ssk" style="    position: fixed;z-index:10001">
            <div class="ssk_qb">
                <a href="./index.php?i=3&c=entry&do=index&m=tiger_taoke">
                    <img src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/images/ssk_fl.png" width="20" height="30" align="absmiddle" /></a></div>
            <div class="ssk" style="position:fixed;left:10%;">
            <form id="search-form" action="./index.php?i=3&c=entry&do=index&m=tiger_taoke" method="get">
                <input type="hidden" name="i" value="3">
                <input type="hidden" name="c" value="entry">
                <input type="hidden" name="m" value="tiger_taoke">
                <input type="hidden" name="do" value="index">
                <div class="ssk_fl">
                <style>
               .seek_btn {position: absolute;width: 40px; height: 30px;right: 0px;top: 0px;-webkit-box-sizing: border-box;border: 1px;border-radius: 3px;cursor: pointer;background-color:#FFF;}
                </style>
                    <input type="text" name="key"  autocomplete="off" value="" placeholder=""/>
                    <button type="submit" id="key" onclick="document.getElementById('key').value=encodeURI(document.getElementById('key').value);getId('search').submit()" class="seek_btn" value="搜本站"><img src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/images/ss_fd.png" /></button>
                    
                </div>
             </form> 
            </div>
            <div class="ssk_fx">
                <a href="javascript:showShareFC();">
                    <img src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/images/ssk_fr.png" width="20" height="30" align="absmiddle" /></a></div>
        </div>
        <div class="yhq_topsm">
            <ul>
                <li class="yhq_topsm_fl">
                    <div>
                        <img src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/images/nz.png" width="16" height="14" align="absmiddle" />&nbsp;内部优惠券，可与淘宝其他活动同时使用，数量有限！<br>
                    </div>
                </li>
                <li class="yhq_topsm_fr"></li>
            </ul>
        </div>
       
        
    
        <div class="sp_con" style="margin-top:15px;">
            <div class="cjf_con">
                <ul>
                <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&do=index&m=tiger_taoke'"  class="handon">
                       <div class="cjf_ev">
                         <p  class="active" >最新</p>
                       </div>
                    </li>
                                    
                    <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&typeid=23&do=index&m=tiger_taoke'" >
                       <div class="cjf_ev">
                         <p  >居家</p>
                       </div>
                    </li>
                                     
                    <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&typeid=20&do=index&m=tiger_taoke'" >
                       <div class="cjf_ev">
                         <p  >服装</p>
                       </div>
                    </li>
                                     
                    <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&typeid=21&do=index&m=tiger_taoke'" >
                       <div class="cjf_ev">
                         <p  >母婴</p>
                       </div>
                    </li>
                                     
                    <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&typeid=22&do=index&m=tiger_taoke'" >
                       <div class="cjf_ev">
                         <p  >美妆</p>
                       </div>
                    </li>
                                     
                    <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&typeid=24&do=index&m=tiger_taoke'" >
                       <div class="cjf_ev">
                         <p  >鞋包</p>
                       </div>
                    </li>
                                     
                    <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&typeid=25&do=index&m=tiger_taoke'" >
                       <div class="cjf_ev">
                         <p  >美食</p>
                       </div>
                    </li>
                                     
                    <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&typeid=26&do=index&m=tiger_taoke'" >
                       <div class="cjf_ev">
                         <p  >文体</p>
                       </div>
                    </li>
                                     
                    <li onclick="javascript:window.location.href='./index.php?i=3&c=entry&typeid=27&do=index&m=tiger_taoke'" >
                       <div class="cjf_ev">
                         <p  >电器</p>
                       </div>
                    </li>
                  
                 
                </ul>
                <div class="clear"></div>
            </div>
        </div>

    <!----->
        <link href="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style7/css/style.css" rel="stylesheet" />
    <link href="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style7/css/swipper.css" rel="stylesheet" />
    
    <div id="containter index_goods">
        <div class="contain-product relative" style="border-top:0">
            <div class="index_list_title">
               <span class="intro_title"><i>今日专享</i> <em>疯狂抢购</em></span>
               <!--span class="index_list_eachall"><a href="/Commodity/ListByCustomCategory?category=1">全部</a></span-->
            </div>
        <div class="contain--product-list swiper2"  style="width:100%;">
            <ul class="swiper-wrapper">
                                <li class="relative swiper-slide">
                    <div class="contain-prolist-in">
                        <a href="./index.php?i=3&c=entry&id=1923&do=view&m=tiger_taoke" class="ImgOut">
                            <div class="allpreContainer">
                                <img style="height:146px;width:146px;" src="http://gd1.alicdn.com/bao/uploaded/i1/TB1zzXyNVXXXXbGaXXXym1v8XXX_020327.jpg_240x240.jpg" >
                            </div>
                        </a>
                        <div class="contain-prolist-text">
                            <h1><a href="./index.php?i=3&c=entry&id=1923&do=view&m=tiger_taoke">特步男鞋跑步鞋秋冬季新款皮面旅游休闲鞋轻便运动鞋男减震慢跑鞋</a></h1>
                            <h2>
                                <span>&yen;139.00</span>
                                <font>&yen;169.00</font>
                            </h2>
                        </div>
                        <a href="javascript:;" class="new-coupon" data-img="http://gd1.alicdn.com/bao/uploaded/i1/TB1zzXyNVXXXXbGaXXXym1v8XXX_020327.jpg_240x240.jpg" data-id="1923"><span>领劵</span><span>立减30.00元</span></a>
                    </div>
                </li>
                                <li class="relative swiper-slide">
                    <div class="contain-prolist-in">
                        <a href="./index.php?i=3&c=entry&id=3168&do=view&m=tiger_taoke" class="ImgOut">
                            <div class="allpreContainer">
                                <img style="height:146px;width:146px;" src="http://img.alicdn.com/imgextra/i3/2978114753/TB2PpWgaNaJ.eBjSsziXXaJ_XXa_!!2978114753.png_240x240.jpg" >
                            </div>
                        </a>
                        <div class="contain-prolist-text">
                            <h1><a href="./index.php?i=3&c=entry&id=3168&do=view&m=tiger_taoke">益趣百变提拉磁性积木哒哒搭益智慧磁力片套装3-6-8-10周岁建构片</a></h1>
                            <h2>
                                <span>&yen;39.90</span>
                                <font>&yen;49.90</font>
                            </h2>
                        </div>
                        <a href="javascript:;" class="new-coupon" data-img="http://img.alicdn.com/imgextra/i3/2978114753/TB2PpWgaNaJ.eBjSsziXXaJ_XXa_!!2978114753.png_240x240.jpg" data-id="3168"><span>领劵</span><span>立减10.00元</span></a>
                    </div>
                </li>
                                <li class="relative swiper-slide">
                    <div class="contain-prolist-in">
                        <a href="./index.php?i=3&c=entry&id=95232&do=view&m=tiger_taoke" class="ImgOut">
                            <div class="allpreContainer">
                                <img style="height:146px;width:146px;" src="http://img01.taobaocdn.com/bao/uploaded/i1/TB1QF_KKFXXXXc0aXXXXXXXXXXX_!!0-item_pic.jpg_240x240.jpg" >
                            </div>
                        </a>
                        <div class="contain-prolist-text">
                            <h1><a href="./index.php?i=3&c=entry&id=95232&do=view&m=tiger_taoke">36支装得力圆珠笔办公文具用品6546原珠笔蓝色油笔按动圆珠笔批发</a></h1>
                            <h2>
                                <span>&yen;3.90</span>
                                <font>&yen;8.90</font>
                            </h2>
                        </div>
                        <a href="javascript:;" class="new-coupon" data-img="http://img01.taobaocdn.com/bao/uploaded/i1/TB1QF_KKFXXXXc0aXXXXXXXXXXX_!!0-item_pic.jpg_240x240.jpg" data-id="95232"><span>领劵</span><span>立减5元</span></a>
                    </div>
                </li>
                                <li class="relative swiper-slide">
                    <div class="contain-prolist-in">
                        <a href="./index.php?i=3&c=entry&id=38465&do=view&m=tiger_taoke" class="ImgOut">
                            <div class="allpreContainer">
                                <img style="height:146px;width:146px;" src="http://img.alicdn.com/imgextra/i3/1645503118/TB2E1TNbBLzQeBjSZFoXXc5gFXa_!!1645503118.jpg_240x240.jpg" >
                            </div>
                        </a>
                        <div class="contain-prolist-text">
                            <h1><a href="./index.php?i=3&c=entry&id=38465&do=view&m=tiger_taoke">顺庭 ST-30C便携式多功能榨汁机家用迷你果汁机料理机搅拌果汁杯</a></h1>
                            <h2>
                                <span>&yen;79.00</span>
                                <font>&yen;139.00</font>
                            </h2>
                        </div>
                        <a href="javascript:;" class="new-coupon" data-img="http://img.alicdn.com/imgextra/i3/1645503118/TB2E1TNbBLzQeBjSZFoXXc5gFXa_!!1645503118.jpg_240x240.jpg" data-id="38465"><span>领劵</span><span>立减60.00元</span></a>
                    </div>
                </li>
                                <li class="relative swiper-slide">
                    <div class="contain-prolist-in">
                        <a href="./index.php?i=3&c=entry&id=47490&do=view&m=tiger_taoke" class="ImgOut">
                            <div class="allpreContainer">
                                <img style="height:146px;width:146px;" src="http://img.alicdn.com/imgextra/i4/1715795472/TB2gwD.dXXXXXaAXXXXXXXXXXXX_!!1715795472.jpg_240x240.jpg" >
                            </div>
                        </a>
                        <div class="contain-prolist-text">
                            <h1><a href="./index.php?i=3&c=entry&id=47490&do=view&m=tiger_taoke">飞科电动剃须刀男士充电式剃须刀水洗防水电动刮胡刀胡须刀FS361</a></h1>
                            <h2>
                                <span>&yen;79.00</span>
                                <font>&yen;99.00</font>
                            </h2>
                        </div>
                        <a href="javascript:;" class="new-coupon" data-img="http://img.alicdn.com/imgextra/i4/1715795472/TB2gwD.dXXXXXaAXXXXXXXXXXXX_!!1715795472.jpg_240x240.jpg" data-id="47490"><span>领劵</span><span>立减20.00元</span></a>
                    </div>
                </li>
                                <li class="relative swiper-slide">
                    <div class="contain-prolist-in">
                        <a href="./index.php?i=3&c=entry&id=68771&do=view&m=tiger_taoke" class="ImgOut">
                            <div class="allpreContainer">
                                <img style="height:146px;width:146px;" src="http://img.alicdn.com/imgextra/i4/2142725685/TB2Tvj1dk1M.eBjSZFFXXc3vVXa_!!2142725685.jpg_240x240.jpg" >
                            </div>
                        </a>
                        <div class="contain-prolist-text">
                            <h1><a href="./index.php?i=3&c=entry&id=68771&do=view&m=tiger_taoke">棉衣女加长款2016冬装新款韩版修身加厚女装冬季外套棉服棉袄毛领</a></h1>
                            <h2>
                                <span>&yen;189.00</span>
                                <font>&yen;269.00</font>
                            </h2>
                        </div>
                        <a href="javascript:;" class="new-coupon" data-img="http://img.alicdn.com/imgextra/i4/2142725685/TB2Tvj1dk1M.eBjSZFFXXc3vVXa_!!2142725685.jpg_240x240.jpg" data-id="68771"><span>领劵</span><span>立减80.00元</span></a>
                    </div>
                </li>
                                <li class="relative swiper-slide">
                    <div class="contain-prolist-in">
                        <a href="./index.php?i=3&c=entry&id=95214&do=view&m=tiger_taoke" class="ImgOut">
                            <div class="allpreContainer">
                                <img style="height:146px;width:146px;" src="http://img.alicdn.com/imgextra/i1/1105387830/TB2qljScr5K.eBjy0FnXXaZzVXa_!!1105387830.jpg_240x240.jpg" >
                            </div>
                        </a>
                        <div class="contain-prolist-text">
                            <h1><a href="./index.php?i=3&c=entry&id=95214&do=view&m=tiger_taoke">木木屋童鞋男童加绒棉鞋2016秋冬款休闲鞋子女童跑步鞋儿童运动鞋</a></h1>
                            <h2>
                                <span>&yen;49.90</span>
                                <font>&yen;69.90</font>
                            </h2>
                        </div>
                        <a href="javascript:;" class="new-coupon" data-img="http://img.alicdn.com/imgextra/i1/1105387830/TB2qljScr5K.eBjy0FnXXaZzVXa_!!1105387830.jpg_240x240.jpg" data-id="95214"><span>领劵</span><span>立减20元</span></a>
                    </div>
                </li>
                            </ul>
         </div>
       </div>
    </div>
       <!-----> 


    
        <section class="goods" id="pageCon" style="padding-bottom:60px;">
   
          <div id="list_box" class="list_box">
              
          </div>
          <div id="list_more" class="loading" style="margin-top:10px;text-align:center">
           <span onclick="get_list(0);">查看更多</span>
         </div>
        </section>
    </div>

<!---->
<link rel="stylesheet" href="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style5/css/style_v3.css">
<div class="nav_box">
     <nav class="nav" id="nav">
      <ul class="">
       <li><a  href="./index.php?i=3&c=entry&do=index&m=tiger_taoke" target="_self"><em class="icon icon-jz"></em><span>首页</span><em class="line"></em></a></li>
       <li><a class='active' href="./index.php?i=3&c=entry&tj=1&do=index&m=tiger_taoke" target="_self"><em class="icon icon-jk"></em><span>9.9专场</span><em class="line"></em></a></li>
       <li><a  href="./index.php?i=3&c=entry&tj=2&do=index&m=tiger_taoke" target="_self"><em class="icon icon-sjk"></em><span>19.9专场</span><em class="line"></em></a></li>
       <li class="_border"><a href="./index.php?i=3&c=entry&do=member&m=tiger_taoke" target="_self"><em class="icon icon-yg"></em><span>个人中心</span><em class="line"></em></a></li>
      </ul>
     </nav>
</div>
<!---->



<link rel="stylesheet" href="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style5/css/dropload.css">
<script src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style5/js/dropload.min.js"></script>
<script type="text/javascript">

var limit = 1;
function get_list(ty){
    
    if(ty==1){
	   $("#pageCon .list_box").html('');
	}else{
	   $("#list_more").html('<div class="loading"><span > 卖命加载中...</span></div>');	   
	}
	
	$.ajax({
	    type : "post",
	    url : "./index.php?i=3&c=entry&do=indexpost&m=tiger_taoke"+"&tj=1&key=&typeid=",
	    data : {
	    	limit:limit,
	    },
        dataType : "json",		
	    success : function(data) {
        //alert("");
	    	if(data.status==1){
						var list = data.content;
						var content = '';
						for(var i=0; i<list.length; i++){

        content+='<a href="./index.php?i=3&c=entry&do=view&m=tiger_taoke'+'&id='+list[i]['id']+'">'
        content +='<div class="yhj" onclick="javascript:window.location.href=./index.php?i=3&c=entry&do=view&m=tiger_taoke'+'&id='+list[i]['id']+'">';
            content +='<div class="yhj_l"><img src="'+list[i]['pic_url']+'_240x240.jpg" width="85" height="85" /></div>';
            content +='<div class="yhj_m">';
        content +='<div class="title">';
 if(list[i]['istmall']==1){
        content +='<span><img src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/images/tm.png" width="40" ';
 }else{
        content +='<span><img src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/images/tb.png" width="40" ';
 }
        content +='height="40"/></span>&nbsp;<font class="title2">'+list[i]['title']+'</font>';
                content +='</div>';
                content +='<div class="mes">现 价 <span class="gr">￥'+list[i]['org_price']+'</span>';
                content +='<br>优惠券 <span class="red">￥'+list[i]['coupons_price']+'</span>';
                content +='</div>';
            content +='</div>';
            content +='<div class="yhq_img"><img src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/images/yhj_m.jpg" ';content +='width="12" height="95"/></div>';
            content +='<div class="yhj_r">￥'+parseInt(list[i]['price'])+'<br><span>券后价</span></div>';
        content +='</div>';
        content +='</a>';



						}
                        $("#pageCon .list_box").append(content);
						var aa = $(".goods-list li").innerWidth();
                        $(".goods-list li img").css('height',aa);
						if(list.length>1){
							$("#list_more").html('<span onclick="get_list(0);">点击查看更多</span>');
						}else{
							$("#list_more").html('<span></span>');
							$("#list_more").fadeOut(500);
						}		
	                    limit++;

		    }else if(data.status==2){
	    		$("#list_more").html('<span>没有更多记录！</span>');
				//dialog("没有更多记录！");
				$("#list_more").fadeOut(500);

	    	}else{
			    $("#list_more").html('<span>没有更多记录！</span>');
				//dialog("没有更多记录！！");
				$("#list_more").fadeOut(500);
			}    	
	    },
	    error : function(xhr, type) {

	    }
	});
	    

}
get_list(0);


//==============自动加载=============
//获取滚动条当前的位置 
function getScrollTop() { 
var scrollTop = 0; 
if (document.documentElement && document.documentElement.scrollTop) { 
scrollTop = document.documentElement.scrollTop; 
} 
else if (document.body) { 
scrollTop = document.body.scrollTop; 
} 
return scrollTop; 
} 

//获取当前可是范围的高度 
function getClientHeight() { 
var clientHeight = 0; 
if (document.body.clientHeight && document.documentElement.clientHeight) { 
clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight); 
} 
else { 
clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight); 
} 
return clientHeight; 
} 

//获取文档完整的高度 
function getScrollHeight() { 
return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 
} 


$(window).scroll(function () { 
if (getScrollTop() + getClientHeight() == getScrollHeight()) { 
//alert("到达底部"); 
get_list(0);
} 
});

//==============自动加载=============  


</script>
    
    <div class="fc_share">
        <img src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/tbgoods/style6/images/fx_fc.png" style="width:80%"/>
    </div>
    <div class="fc_share_bg"></div>
    
    <script type="text/javascript">
        
        $(function($){
            $('.fc_share_bg').click(function(){
                $('.fc_share').hide();
                $('.fc_share_bg').hide();
            });
            $('.fc_share').click(function(){
                $('.fc_share').hide();
                $('.fc_share_bg').hide();
            });
        });
        
        function showShareFC(){
            
            $('.fc_share').show();
            $('.fc_share_bg').show();
            
        }
        
    </script>

<script src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/user/js/jquery-1.7.2.min.js"></script>
<script src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/user/js/tool.js"></script>
<script src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/user/js/asynloading.js"></script>
<script src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/user/js/idangerous.swiper.min.js"></script>
<script src="http://www.juweinong.cn/addons/tiger_taoke/template/mobile/user/js/common_phone.js"></script>

<script>        
      var swiper = new Swiper('.swiper-container', {
                pagination: '.swiper-pagination',
                paginationClickable: true,
                loop: true,
                effect:'flip',
                autoplay:5000,
            });
      var swiper2 = new Swiper('.swiper2', {
                slidesPerView: 'auto',
                paginationClickable: true,
                freeMode: true,
                autoplay:3000,
                pagination: '.swiper-pagination',
                
      });


//弹出领券
    $(document).delegate(".new-coupon,.goodsget", "click", function () {        
        var $this = $(this);
        //alert($this.attr("data-img"));
        var id = $this.data("id");
        $.ajax({
            type: "post",
            url: "./index.php?i=3&c=entry&do=GetCoupon&m=tiger_taoke",
            dataType: "json",
            data: { id: id },
            success: function (data) {
                if (data.msg == "申请失败") {
                    popTao($this.attr("data-img"), "淘口令", "您暂无权限领取该优惠券，请先升级会员");
                    $(".taokaobox").html("<div class='popwcc'><a href='javascript:;' onclick='location.href=\"/Customer/Upgrade\"' class='popwcomfirm'>去升级</a></div>");
                    //location.href = "/Customer/Upgrade";
                }
                else {
                    popTao($this.attr("data-img"), "淘口令", data.url);
                }
                selection()
            }
        });
    })
    </script>
</body>
</html>
